package beanstao.util.response;

import beanstao.util.json.JsonLib;
import beanstao.util.store.domainobject.Domain;


public class DomainData extends PD
{
	private DomainData()
	{
	}

	static DomainData ME(Domain domain)
	{
		if (domain.getIsDeleted())
			return new DomainData();
		else
		{
			DomainData data = new DomainData();
			data._responseData = domain;
			return data;
		}

	}

	@Override
	public String toJson()
	{
		if (null == _responseData)
		{
			this.logWarn("Response数据为空。");
			return null;
		}
		return JsonLib.fromObject(_responseData);
	}
}
